#include "FITKAbsGeoModelClinching.h"
#include "FITK_Interface/FITKInterfaceModel/FITKAbstractModel.h"

namespace Interface
{
    /**
    * @brief 无铆连接--上模
    */
    FITKAbsGeoModelClinchingPunch::~FITKAbsGeoModelClinchingPunch(){}

    void FITKAbsGeoModelClinchingPunch::setPoint1(double* p1)
    {
        if(p1 == nullptr) return;
        FITKAbstractModel::CopyArray(p1, _point1, 3);
    }
    void FITKAbsGeoModelClinchingPunch::getPoint1(double* p1)
    {
        if (p1 == nullptr) return;
        FITKAbstractModel::CopyArray( _point1, p1, 3);
    }

    void FITKAbsGeoModelClinchingPunch::setOutRadius(double R){
        _OutRadius = R;
    }
    double FITKAbsGeoModelClinchingPunch::getOutRadius(){
        return _OutRadius;
    }

    void FITKAbsGeoModelClinchingPunch::setinnerRadius(double r){
        _innerRadius = r;
    }
    double FITKAbsGeoModelClinchingPunch::getinnerRadius(){
        return _innerRadius;
    }

    void FITKAbsGeoModelClinchingPunch::setRadius(double radius){
        _Radius = radius;
    }
    double FITKAbsGeoModelClinchingPunch::getRadius(){
        return _Radius;
    }

    void FITKAbsGeoModelClinchingPunch::setLength(double l){
        _Length = l;
    }
    double FITKAbsGeoModelClinchingPunch::getLength(){
        return _Length;
    }

    FITKGeoEnum::FITKGeometryComType FITKAbsGeoModelClinchingPunch::getGeometryCommandType()
    {
        return FITKGeoEnum::FGTClinchingPunch;
    }


    /**
    * @brief 无铆连接--压边圈
    */
    FITKAbsGeoModelClinchingBH::~FITKAbsGeoModelClinchingBH(){}

    void FITKAbsGeoModelClinchingBH::setPoint1(double* p1)
    {
        if(p1 == nullptr) return;
        FITKAbstractModel::CopyArray(p1, _point1, 3);
    }
    void FITKAbsGeoModelClinchingBH::getPoint1(double* p1)
    {
        if (p1 == nullptr) return;
        FITKAbstractModel::CopyArray( _point1, p1, 3);
    }

    void FITKAbsGeoModelClinchingBH::setOutRadius(double R){
        _OutRadius = R;
    }
    double FITKAbsGeoModelClinchingBH::getOutRadius(){
        return _OutRadius;
    }

    void FITKAbsGeoModelClinchingBH::setinnerRadius(double r){
        _innerRadius = r;
    }
    double FITKAbsGeoModelClinchingBH::getinnerRadius(){
        return _innerRadius;
    }

    FITKGeoEnum::FITKGeometryComType FITKAbsGeoModelClinchingBH::getGeometryCommandType()
    {
        return FITKGeoEnum::FGTClinchingBH;
    }


    /**
    * @brief 无铆连接--下模
    */
    FITKAbsGeoModelClinchingDie::~FITKAbsGeoModelClinchingDie(){}

    void FITKAbsGeoModelClinchingDie::setPoint1(double* p1)
    {
        if(p1 == nullptr) return;
        FITKAbstractModel::CopyArray(p1, _point1, 3);
    }
    void FITKAbsGeoModelClinchingDie::getPoint1(double* p1)
    {
        if (p1 == nullptr) return;
        FITKAbstractModel::CopyArray( _point1, p1, 3);
    }

    void FITKAbsGeoModelClinchingDie::setOutRadius(double R){
        _OutRadius = R;
    }
    double FITKAbsGeoModelClinchingDie::getOutRadius(){
        return _OutRadius;
    }

    void FITKAbsGeoModelClinchingDie::setinnerRadius(double r){
        _innerRadius = r;
    }
    double FITKAbsGeoModelClinchingDie::getinnerRadius(){
        return _innerRadius;
    }

    void FITKAbsGeoModelClinchingDie::setRadius(double radius){
        _Radius = radius;
    }
    double FITKAbsGeoModelClinchingDie::getRadius(){
        return _Radius;
    }

    void FITKAbsGeoModelClinchingDie::setLength(double l){
        _Length = l;
    }
    double FITKAbsGeoModelClinchingDie::getLength(){
        return _Length;
    }

    FITKGeoEnum::FITKGeometryComType FITKAbsGeoModelClinchingDie::getGeometryCommandType()
    {
        return FITKGeoEnum::FGTClinchingDie;
    }


    /**
    * @brief 无铆连接--上板料
    */
    FITKAbsGeoModelClinchingTopSheet::~FITKAbsGeoModelClinchingTopSheet(){}

    void FITKAbsGeoModelClinchingTopSheet::setPoint1(double* p1)
    {
        if(p1 == nullptr) return;
        FITKAbstractModel::CopyArray(p1, _point1, 3);
    }
    void FITKAbsGeoModelClinchingTopSheet::getPoint1(double* p1)
    {
        if (p1 == nullptr) return;
        FITKAbstractModel::CopyArray( _point1, p1, 3);
    }

    void FITKAbsGeoModelClinchingTopSheet::setRadius(double radius){
        _Radius = radius;
    }
    double FITKAbsGeoModelClinchingTopSheet::getRadius(){
        return _Radius;
    }

    void FITKAbsGeoModelClinchingTopSheet::setLength(double l){
        _Length = l;
    }
    double FITKAbsGeoModelClinchingTopSheet::getLength(){
        return _Length;
    }

    FITKGeoEnum::FITKGeometryComType FITKAbsGeoModelClinchingTopSheet::getGeometryCommandType()
    {
        return FITKGeoEnum::FGTClinchingTopSheet;
    }


    /**
    * @brief 无铆连接--下板料
    */
    FITKAbsGeoModelClinchingBottomSheet::~FITKAbsGeoModelClinchingBottomSheet(){}

    void FITKAbsGeoModelClinchingBottomSheet::setPoint1(double* p1)
    {
        if(p1 == nullptr) return;
        FITKAbstractModel::CopyArray(p1, _point1, 3);
    }
    void FITKAbsGeoModelClinchingBottomSheet::getPoint1(double* p1)
    {
        if (p1 == nullptr) return;
        FITKAbstractModel::CopyArray( _point1, p1, 3);
    }

    void FITKAbsGeoModelClinchingBottomSheet::setRadius(double radius){
        _Radius = radius;
    }
    double FITKAbsGeoModelClinchingBottomSheet::getRadius(){
        return _Radius;
    }

    void FITKAbsGeoModelClinchingBottomSheet::setLength(double l){
        _Length = l;
    }
    double FITKAbsGeoModelClinchingBottomSheet::getLength(){
        return _Length;
    }

    FITKGeoEnum::FITKGeometryComType FITKAbsGeoModelClinchingBottomSheet::getGeometryCommandType()
    {
        return FITKGeoEnum::FGTClinchingBottomSheet;
    }

}

